﻿<UserControl x:Class="JoystickPanel"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="Auto" Height="Auto">
    <Grid>
    	<Grid.ColumnDefinitions>
    		<ColumnDefinition Width="Auto"/>
    		<ColumnDefinition Width="*"/>
    	</Grid.ColumnDefinitions>
    	<Grid.RowDefinitions>
    		<RowDefinition Height="Auto"/>
    		<RowDefinition Height="*"/>
    		<RowDefinition Height="*"/>
    		<RowDefinition Height="*"/>
    		<RowDefinition Height="*"/>
    	</Grid.RowDefinitions>
    	<StackPanel Orientation="Horizontal" Grid.ColumnSpan="2">
			<TextBlock Text="Joystick" FontSize="24" />
			<TextBlock Text="{Binding Path=JoystickNumber}" FontSize="24" />
		</StackPanel>
		<TextBlock Text="X" Grid.Row="1" TextAlignment="Center" VerticalAlignment="Center" Margin="5, 0"/>
		<TextBlock Text="Y" Grid.Row="2" TextAlignment="Center" VerticalAlignment="Center" Margin="5, 0" />
		<TextBlock Text="Z" Grid.Row="3" TextAlignment="Center" VerticalAlignment="Center" Margin="5, 0" />
		<TextBlock Text="Twist" Grid.Row="4" TextAlignment="Center" VerticalAlignment="Center" Margin="5, 0"/>
        <ProgressBar Value="{Binding Path=X, Mode=OneWay}" Grid.Column="1" Grid.Row="1" Minimum="-1000" Maximum="1000" />
        <ProgressBar Value="{Binding Path=Y, Mode=OneWay}" Grid.Column="1" Grid.Row="2" Minimum="-1000" Maximum="1000" />
        <ProgressBar Value="{Binding Path=Z, Mode=OneWay}" Grid.Column="1" Grid.Row="3" Minimum="-1000" Maximum="1000" />
        <ProgressBar Value="{Binding Path=Twist, Mode=OneWay}" Grid.Column="1" Grid.Row="4" Minimum="-1000" Maximum="1000"  />
    </Grid>
</UserControl>
